package com.rainman.simpleredis.core.simplemq.sch_worker;

import com.rainman.simpleredis.core.scheduled.ScheduledInfo;
import com.rainman.simpleredis.core.scheduled.SimpleScheduledWorkerInterface;

public class RealServerSchWorker implements SimpleScheduledWorkerInterface {

    private String key;
    private Runnable workerDo;
    private ScheduledInfo info=ScheduledInfo.buildDelay(5753L);
    public RealServerSchWorker(String key,Runnable runnable){
        this.key=key;
        this.workerDo=runnable;
    }

    @Override
    public void doWork() {
        workerDo.run();
    }

    @Override
    public String key() {
        return key;
    }

    @Override
    public ScheduledInfo info() {
        return info;
    }
}
